import {getRequest, postRequest} from '@/lib/request';

export const payApi = {
    payCarry: (param) => {
        return postRequest('/order/create/carry', param)
    },
    pay: (param) => {
        return postRequest('/order/pay', param)
    },
    getCharge: () => {
        return getRequest('/recharge')
    },
    // 创建充值套餐订单
    payCharge: (param) => {
        return postRequest('/order/create/recharge', param)
    },
    // 创建保证金订单
    payDeposit: () => {
        return postRequest('/order/create/deposit')
    },
    // 订单列表
    getOrderSee: (data) => {
        return getRequest(`/order/see?order_type=${data.order_type}&user_order_status=${data.user_order_status}&player_order_status=${data.player_order_status}&end_time=${data.end_time}&start_time=${data.start_time}`)
    },
    // 打手开始服务
    handStart: (data) => {
        return postRequest(`/hand/start`, data)
    },
    // 打手上传截图
    screenshot: (data) => {
        return postRequest(`/hand/screenshot`, data)
    },
    // 用户确认完成服务
    complete: (data) => {
        return postRequest(`/hand/complete`, data)
    },
    // 用户取消订单
    handCancel: (data) => {
        return postRequest(`/hand/cancel`, data)
    },
    // 我的接单
    getOrderMy: () => {
        return getRequest(`/order/my`)
    },
    // 提现
    getWithdraw: (data) => {
        return postRequest(`/withdraw?price=${data.price}`)
    },
    // 提现列表
    getWithdrawList: (data) => {
        return getRequest(`/withdraw/list?page=${data.page}`)
    },
}